package o2o.dao.VO.shop;

import com.jinyou.utils.common.ValidateUtil;
import o2o.system.data.SYS_CONFIG_PATH;

import java.io.Serializable;


//广告轮播图

public class AdvertInfoVO implements Serializable {

    private Long id;
    private int type;            //广告类型  （1：首页顶部轮播图，2：首页中间轮播图）
    private String code;//编码
    private String imageUrl;    //广告图片地址
    private String imageUrlB;    //广告图片地址2
    private String videoUrl;    // 视频播放地址
    private Long agentId;//代理ID

    private String descs;        //广告描述
    private int isLink;        //是否有超链接
    private String link;        //链接地址或ID  AppID(小程序ID)
    private String link2;       // 原始ID gh_0fcdfd24e63d
    private String link3;       // 小程序跳转页 xcxPages
    private int linkType = 1;   //链接类型   1网址，2链接店铺，3链接行业

    private String orderNo;//排序编号

    private String province;    //省
    private String city;        //市
    private String county;        //区县

    private String cityEN;//英文城市

    private int delFlag;//是否已删除
    private Long createTime;        //创建时间
    private String createUser;    //创建者
    private String updateUser;    //最后更新着

    private ShopInfoVO shopInfo;//店铺信息
    private ShopTypeInfoVO shopTypeInfo;//行业信息


    private Integer isDefault;        //无轮播图时，默认显示  1默认 0不默认

    private String extra1;    //备用字段1
    private String extra2;    //备用字段2
    private String extra3;    //备用字段3


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getLink2() {
        return link2;
    }

    public AdvertInfoVO setLink2(String link2) {
        this.link2 = link2;
        return this;
    }

    public String getLink3() {
        return link3;
    }

    public AdvertInfoVO setLink3(String link3) {
        this.link3 = link3;
        return this;
    }

    public String getImageUrl() {
        if (ValidateUtil.isNotNull(imageUrl)) {
            if (!"http".equalsIgnoreCase(imageUrl.substring(0, 4))) {
//                imageUrl = Common.imageUrl + imageUrl;
                imageUrl = SYS_CONFIG_PATH.IMAGE_BASE_URL + imageUrl;
            }
        }
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getImageUrlB() {

        if (ValidateUtil.isNotNull(imageUrlB)) {
            if (!"http".equalsIgnoreCase(imageUrlB.substring(0, 4))) {
//                imageUrl = Common.imageUrl + imageUrl;
                imageUrlB = SYS_CONFIG_PATH.IMAGE_BASE_URL + imageUrlB;
            }
        }
        return imageUrlB;
    }

    public void setImageUrlB(String imageUrlB) {
        this.imageUrlB = imageUrlB;
    }

    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }

    public int getIsLink() {
        return isLink;
    }

    public void setIsLink(int isLink) {
        this.isLink = isLink;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }


    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }


    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(int delFlag) {
        this.delFlag = delFlag;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public int getLinkType() {
        return linkType;
    }

    public void setLinkType(int linkType) {
        this.linkType = linkType;
    }

    public ShopInfoVO getShopInfo() {
        return shopInfo;
    }

    public void setShopInfo(ShopInfoVO shopInfo) {
        this.shopInfo = shopInfo;
    }

    public ShopTypeInfoVO getShopTypeInfo() {
        return shopTypeInfo;
    }

    public void setShopTypeInfo(ShopTypeInfoVO shopTypeInfo) {
        this.shopTypeInfo = shopTypeInfo;
    }

        public Long getAgentId() {
        return agentId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public String getExtra1() {
        return extra1;
    }

    public void setExtra1(String extra1) {
        this.extra1 = extra1;
    }

    public String getExtra2() {
        return extra2;
    }

    public void setExtra2(String extra2) {
        this.extra2 = extra2;
    }

    public String getExtra3() {
        return extra3;
    }

    public void setExtra3(String extra3) {
        this.extra3 = extra3;
    }

    public String getCityEN() {
        return cityEN;
    }

    public void setCityEN(String cityEN) {
        this.cityEN = cityEN;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }
}
